import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:wan_android_flutter/modules/common_web/common_web_binding.dart';
import 'package:wan_android_flutter/modules/common_web/common_web_page.dart';
import 'package:wan_android_flutter/modules/favorite/favorite_binding.dart';
import 'package:wan_android_flutter/modules/favorite/favorite_page.dart';
import 'package:wan_android_flutter/modules/hot/hot_binding.dart';
import 'package:wan_android_flutter/modules/hot/hot_page.dart';
import 'package:wan_android_flutter/modules/login/login_binding.dart';
import 'package:wan_android_flutter/modules/login/login_page.dart';
import 'package:wan_android_flutter/modules/main/drawer/drawer_binding.dart';
import 'package:wan_android_flutter/modules/main/knowledge_system/knowledge_system_binding.dart';
import 'package:wan_android_flutter/modules/main/knowledge_system/single_knowledge_system/single_knowledge_system_binding.dart';
import 'package:wan_android_flutter/modules/main/knowledge_system/single_knowledge_system/single_knowledge_system_page.dart';
import 'package:wan_android_flutter/modules/main/main_binding.dart';
import 'package:wan_android_flutter/modules/main/main_page.dart';
import 'package:wan_android_flutter/modules/search_result/search_result_binding.dart';
import 'package:wan_android_flutter/modules/search_result/search_result_page.dart';
import 'package:wan_android_flutter/modules/splash/splash_binding.dart';
import 'package:wan_android_flutter/modules/splash/splash_page.dart';
import 'package:wan_android_flutter/modules/tutorial/tutorial_binding.dart';
import 'package:wan_android_flutter/modules/tutorial/tutorial_page.dart';
import '../../modules/main/home/home_binding.dart';
import '../../modules/search/search_binding.dart';
import '../../modules/search/search_page.dart';
import 'route_manager.dart';

class PageManager {
  static final List<GetPage> pages = [
    /// 启动页
    GetPage(
      name: RouteManager.splashPage,
      page: () => SplashPage(),
      binding: SplashBinding(),
    ),

    /// 登录页
    GetPage(name: RouteManager.loginPage, page: () => LoginPage(), binding: LoginBinding()),

    /// 首页
    GetPage(
        name: RouteManager.mainPage,
        page: () => MainPage(),
        bindings: [MainBinding(), HomeBinding(), KnowledgeSystemBinding(), DrawerBinding()]),

    /// 单个知识体系页面
    GetPage(
        name: RouteManager.singleKnowledgePage,
        page: () => SingleKnowledgeSystemPage(),
        bindings: [SingleKnowledgeSystemBinding()]),

    /// 热门
    GetPage(name: RouteManager.hotPage, page: () => HotPage(), binding: HotBinding()),

    /// 搜索页
    GetPage(name: RouteManager.searchPage, page: () => SearchPage(), binding: SearchBinding()),

    /// 搜索结果页
    GetPage(
        name: RouteManager.searchResultPage,
        page: () => SearchResultPage(),
        bindings: [SearchResultBinding()]),

    /// 搜索结果页
    GetPage(
        name: RouteManager.tutorialPage, page: () => TutorialPage(), binding: TutorialBinding()),

    /// 收藏页
    GetPage(
        name: RouteManager.favoritePage, page: () => FavoritePage(), binding: FavoriteBinding()),

    /// 通用的web页面
    GetPage(
      name: RouteManager.commonWebPage,
      page: () => CommonWebPage(),
      binding: CommonWebBinding(),
    ),
  ];
}
